package com.bill.gaty.mfidelity.dto;

import android.util.Log;

import com.bill.gaty.mfidelity.beans.Gtf;
 
import com.google.gson.Gson;
 
public class ResponseData{
	  
	  
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public DateDto getDateMiseAJour() {
		return date_mise_a_jour;
	}
	public void setDateMiseAJour(DateDto date_mise_a_jour) {
		this.date_mise_a_jour = date_mise_a_jour;
	}
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getLangue() {
		return langue;
	}
	public void setLangue(String langue) {
		this.langue = langue;
	}
	public String getVotrenom() {
		return votrenom;
	}
	public void setVotrenom(String votrenom) {
		this.votrenom = votrenom;
	}
	public DateDto getDate_mise_a_jour() {
		return date_mise_a_jour;
	}

	public void setDate_mise_a_jour(DateDto date_mise_a_jour) {
		this.date_mise_a_jour = date_mise_a_jour;
	}

	public String getNomdevotreami() {
		return nomdevotreami;
	}
	public void setNomdevotreami(String nomdevotreami) {
		this.nomdevotreami = nomdevotreami;
	}
	 private DateDto date_mise_a_jour;
	 private String username; 
	 private String password;
	 private String langue;
	 private String votrenom;
	 private String data;
	 public String getData() {
		return data;
	}
	 
	@Override
	public String toString() {
		return "ResponseData [date_mise_a_jour=" + date_mise_a_jour
				+ ", username=" + username + ", password=" + password
				+ ", langue=" + langue + ", votrenom=" + votrenom + ", data="
				+ data + ", date=" + date + ", id=" + id + ", nomdevotreami="
				+ nomdevotreami + ", getGtf()=" + getGtf() + "]";
	}
	public void setData(String data) {
		this.data = data;
	}
	public Gtf getGtf(){
		try{
		String d=getData();
		Log.i("Gtf getGtf()",d);
		Gson g=new Gson();
		Gtf res = g.fromJson(d, Gtf.class);
		res.setNomDeVotreAmi(nomdevotreami);
		res.setVotreNom(votrenom);
		 
		 
		return res;
		}catch (Exception e) {
			// TODO: handle exception
			
			return null;
		}
	}
	public DateDto getDate() {
		return date;
	}

	public void setDate(DateDto date) {
		this.date = date;
	}
	private  DateDto date;
	 private int id;
	 private String nomdevotreami;
}